<template>
  <el-dialog title="提示" :visible.sync="showDialog" width="35%"
             :before-close="closeElDialog"
  >
    <div class="system-settings-submit-tips">
      <span>{{elTip}}</span>
    </div>
    <div style="margin-top: 20px;text-align: center">
      <el-button type="primary" @click="confirmSubmit">确 定</el-button>
      <el-button @click="confirmCancel" style="margin-left: 60px">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
    function noop() {}
    export default {
      name: "index",
      props: {
        showDialog: {
          required: true,
          type: Boolean,
          default: false,
        },
        elTip: {
          required:false,
          type: String,
          default: "确定要执行该操作吗?"
        },
        confirmSubmit: {
          required : true,
          type: Function,
          default: noop()
        },
        confirmCancel: {
          required : true,
          type: Function,
          default: noop()
        },
      },
      methods: {
        closeElDialog(done) {
          this.$emit('closeDialog')
          done()
        }
      }
    }
</script>

<style scoped>

</style>
